package com.zzt.common.base;

import java.util.List;

import org.hibernate.Query;
import org.hibernate.ScrollableResults;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;

public class BaseDao<T> {

	@Autowired
	protected SessionFactory sessionFactory;
     
	public <T> void save(T t) {
    Session session=null;
    try {
		session=sessionFactory.getCurrentSession();
		session.save(t);
	} catch (Exception e) {
		// TODO: handle exception
		session.close();
	}		
	}
	
	
}

